#ifndef SINGLETON_H_INCLUDED_55786860
#define SINGLETON_H_INCLUDED_55786860
//-----------------------------------------------------------------------------
// Copyright (c) 2011 David Waby
// Initially created on 03/11/2011
//-----------------------------------------------------------------------------

//-----------------------------------------------------------------------------
template <typename T>
class Singleton
{
public:
	virtual							~Singleton() {}

	static inline T&				Get();
	static inline bool				Exists();

	static inline void				Create();
	static inline void				Release();

protected:

									Singleton();

	static T *						ms_instance;

private:
									Singleton(const Singleton &rhs);
									Singleton& operator = (const Singleton &rhs);
};

#include "Singleton.inl"

//-----------------------------------------------------------------------------
#endif // SINGLETON_H_INCLUDED_55786860
